
//------------------------------------------------------------------------------
pulse.file.isFileNameValid = function( sFileName, bMsgBox )
{
	try
	{
		pulse.todo( 'Test range of allowed characters' );
		pulse.todo( 'Test consecutive control characters such as __ or ..' );
		if ( sFileName == null )
			throw 'The file name cannot be null';
		if ( sFileName == '' )
			throw 'The file name cannot be empty';
		if ( sFileName[ 0 ] == '.' )
			throw 'The file name cannot start with a \'.\'';
	}
	catch( sError )
	{
		if ( bMsgBox )
		{
			pulse.error( sError, true );
		}
		return false;
	}
	
	return true;
}

//------------------------------------------------------------------------------
pulse.file.isDirNameValid = function( sDirName, bMsgBox )
{
	try
	{
		pulse.todo( 'Test range of allowed characters' );
		if ( sFileName == null )
			throw 'The folder name cannot be null';
		if ( sFileName == '' )
			throw 'The folder name cannot be empty';
	}
	catch( sError )
	{
		if ( bMsgBox )
		{
			pulse.error( sError, true );
		}
		return false;
	}
	
	return true;
}